import DestructibleFacility from "../../facility/DestructibleFacility";
import HealthPoint, { Killer } from "../../funcObj/interface/HealthPoint";
import { Location } from "../../info/Predefine";
import Player from "../../player/Player";
import DestructibleFlyer from "../DestructibleFlyer";

const { ccclass, property } = cc._decorator;

@ccclass
export default class PLayerDestructibleFlyer extends DestructibleFlyer {

    protected start(): void {
        this.init(null);
        this.collider.enabled = true;
    }

    init(base: DestructibleFacility, target?: HealthPoint | cc.Vec3 | Location): void { }

    reducedHp(killer: Killer): boolean {
        this.getComponent(Player).die(killer);
        return true;
    }

    protected update(dt: number): void { }

}
